#include "reset.h"
#include "ui_reset.h"
#include <QMessageBox>
reset *reset::myreset=nullptr;
reset::reset(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::reset)
{
    ui->setupUi(this);
}

reset::~reset()
{
    delete ui;
}

void reset::on_pushButton_clicked()
{
    if(ui->password->text()!=ui->passwordconfirm->text()){
        QMessageBox::warning(this, tr("Waring"),
                                      tr("两次密码输入不同！"),
                                      QMessageBox::Yes);
        ui->password->clear();
        ui->passwordconfirm->clear();}
    else{
        emit(sendpassword(ui->password->text()));
        close();
    }
}
